package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.net.mapper.ElementBusiElineUniMapper;
import com.ruoyi.net.domain.ElementBusiElineUni;
import com.ruoyi.net.service.IElementBusiElineUniService;

/**
 * 网元-业务-eline-uni基本属性Service业务层处理
 * 
 * @author net
 * @date 2024-11-17
 */
@Service
public class ElementBusiElineUniServiceImpl implements IElementBusiElineUniService 
{
    @Autowired
    private ElementBusiElineUniMapper elementBusiElineUniMapper;

    /**
     * 查询网元-业务-eline-uni基本属性
     * 
     * @param id 网元-业务-eline-uni基本属性主键
     * @return 网元-业务-eline-uni基本属性
     */
    @Override
    public ElementBusiElineUni selectElementBusiElineUniById(String id)
    {
        return elementBusiElineUniMapper.selectElementBusiElineUniById(id);
    }

    /**
     * 查询网元-业务-eline-uni基本属性列表
     * 
     * @param elementBusiElineUni 网元-业务-eline-uni基本属性
     * @return 网元-业务-eline-uni基本属性
     */
    @Override
    public List<ElementBusiElineUni> selectElementBusiElineUniList(ElementBusiElineUni elementBusiElineUni)
    {
        return elementBusiElineUniMapper.selectElementBusiElineUniList(elementBusiElineUni);
    }

    /**
     * 新增网元-业务-eline-uni基本属性
     * 
     * @param elementBusiElineUni 网元-业务-eline-uni基本属性
     * @return 结果
     */
    @Override
    public int insertElementBusiElineUni(ElementBusiElineUni elementBusiElineUni)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(elementBusiElineUni.getId())) {
            elementBusiElineUni.setId(uuid);
        }
        elementBusiElineUni.setCreateBy(SecurityUtils.getUsername());
        elementBusiElineUni.setCreateTime(DateUtils.getNowDate());
        elementBusiElineUni.setUpdateBy(SecurityUtils.getUsername());
        elementBusiElineUni.setUpdateTime(DateUtils.getNowDate());
        return elementBusiElineUniMapper.insertElementBusiElineUni(elementBusiElineUni);
    }

    /**
     * 修改网元-业务-eline-uni基本属性
     * 
     * @param elementBusiElineUni 网元-业务-eline-uni基本属性
     * @return 结果
     */
    @Override
    public int updateElementBusiElineUni(ElementBusiElineUni elementBusiElineUni)
    {
        elementBusiElineUni.setUpdateBy(SecurityUtils.getUsername());
        elementBusiElineUni.setUpdateTime(DateUtils.getNowDate());
        return elementBusiElineUniMapper.updateElementBusiElineUni(elementBusiElineUni);
    }

    /**
     * 批量删除网元-业务-eline-uni基本属性
     * 
     * @param ids 需要删除的网元-业务-eline-uni基本属性主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiElineUniByIds(String[] ids)
    {
        return elementBusiElineUniMapper.deleteElementBusiElineUniByIds(ids);
    }

    /**
     * 删除网元-业务-eline-uni基本属性信息
     * 
     * @param id 网元-业务-eline-uni基本属性主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiElineUniById(String id)
    {
        return elementBusiElineUniMapper.deleteElementBusiElineUniById(id);
    }
}
